/**
 * 
 */
package sh.t2.share.module.player.log;

import org.banish.sql.core.annotation.Column;
import org.banish.sql.core.annotation.Id;
import org.banish.sql.core.annotation.Index;
import org.banish.sql.core.annotation.MappedSuperclass;
import org.banish.sql.core.annotation.SuperIndex;
import org.banish.sql.core.annotation.Id.Strategy;
import org.banish.sql.core.entity.AbstractEntity;
import org.gaming.tool.DateTimeUtil;

/**
 * 
 */
@MappedSuperclass
@SuperIndex(indexs = @Index(fields = { "playerId" }))
public abstract class PlayerNumberLog extends AbstractEntity {
	@Id(strategy = Strategy.AUTO)
	@Column(comment = "唯一ID")
	private long id;
	@Column(comment = "玩家ID")
	private long playerId;
	@Column(comment = "变化量")
	private long delta;
	@Column(comment = "变化后的当前量")
	private long curr;
	@Column(comment = "原因")
	private String reason;
	@Column(comment = "发生时间")
	private long time = DateTimeUtil.currMillis();

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getPlayerId() {
		return playerId;
	}

	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}

	public long getDelta() {
		return delta;
	}

	public void setDelta(long delta) {
		this.delta = delta;
	}

	public long getCurr() {
		return curr;
	}

	public void setCurr(long curr) {
		this.curr = curr;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}
}
